// SquareLine LVGL GENERATED FILE
// EDITOR VERSION: SquareLine Studio 1.1.1
// LVGL VERSION: 8.2.0
// PROJECT: SquareLine_Project

#include "ui.h"
#include "ui_helpers.h"
#define SIMULATION 1
//#define SIMULATION 1
#ifdef SIMULATION
#include <unistd.h>
#endif
lv_obj_t *ui_Screen1_Label1;
///////////////////// VARIABLES ////////////////////
lv_obj_t * ui_Screen1;
lv_obj_t * ui_Screen1_Image1;
lv_obj_t * ui_Screen1_Label1;
lv_obj_t * ui_Screen1_Label5;
lv_obj_t * ui_Screen1_Panel2;
lv_obj_t * ui_Screen1_Image2;
lv_obj_t * ui_Screen1_Label2;
lv_obj_t * ui_Screen1_Label6;
lv_obj_t * ui_Screen1_Panel3;
lv_obj_t * ui_Screen1_Image3;
lv_obj_t * ui_Screen1_Label3;
lv_obj_t * ui_Screen1_Label7;
lv_obj_t * ui_Screen1_Panel4;
lv_obj_t * ui_Screen1_Image4;
lv_obj_t * ui_Screen1_Label4;
lv_obj_t * ui_Screen1_Label8;
lv_obj_t * ui_Screen1_Label9;
void ui_event_Screen2(lv_event_t * e);
lv_obj_t * ui_Screen2;
lv_obj_t * ui_Screen2_Panel1;
lv_obj_t * ui_Screen2_ImgButton1;
lv_obj_t * ui_Screen2_ImgButton2;
lv_obj_t * ui_Screen2_ImgButton3;
lv_obj_t * ui_Screen2_Label2;
lv_obj_t *ui_Screen2_Panel3;
lv_obj_t *ui_Screen2_Panel2;
void ui_event_Screen3(lv_event_t * e);
lv_obj_t * ui_Screen3;
lv_obj_t *ui_Screen3_Panel1;
lv_obj_t * ui_Screen3_ImgButton2;
lv_obj_t * ui_Screen3_Label1;
void ui_event_Screen4(lv_event_t * e);
lv_obj_t * ui_Screen4;
lv_obj_t *ui_Screen4_Panel1;
lv_obj_t * ui_Screen3_ImgButton1;
lv_obj_t * ui_Screen3_Label2;

lv_obj_t * ui_Screen5;
lv_obj_t *ui_Screen5_Panel1;
lv_obj_t * ui_Screen5_Label2;
lv_obj_t * ui_Screen5_ImgButton1;
void ui_event_Screen5(lv_event_t * e);
lv_obj_t * ui_Screen6;
lv_obj_t *ui_Screen6_Panel1;
lv_obj_t * ui_Screen6_Label2;
lv_obj_t * ui_Screen6_ImgButton1;
void ui_event_Screen6(lv_event_t * e);
lv_obj_t * ui_Screen7;
lv_obj_t *ui_Screen7_Panel1;
lv_obj_t * ui_Screen7_Label2;
lv_obj_t * ui_Screen7_ImgButton1;
void ui_event_Screen7(lv_event_t * e);


enum screen_status
{
    idle=0,
    heart_test=1,
    temp_test,
    sport_test,
    xx_test,
    xxx_test

} g_screen_status;
///////////////////// TEST LVGL SETTINGS ////////////////////
#if LV_COLOR_DEPTH != 16
    #error "LV_COLOR_DEPTH should be 16bit to match SquareLine Studio's settings"
#endif
#if LV_COLOR_16_SWAP !=0
  //  #error "LV_COLOR_16_SWAP should be 0 to match SquareLine Studio's settings"
#endif

///////////////////// ANIMATIONS ////////////////////

///////////////////// FUNCTIONS ////////////////////
void ui_event_Screen1_ImgButton1(lv_event_t * e)
{
    lv_event_code_t event_code = lv_event_get_code(e);
    lv_obj_t * target = lv_event_get_target(e);
    if(event_code == LV_EVENT_RELEASED) {
       if(g_screen_status==idle)
       {
        lv_obj_add_flag(ui_Screen2_Panel2, LV_OBJ_FLAG_HIDDEN);
        lv_obj_clear_flag(ui_Screen2_Panel3, LV_OBJ_FLAG_HIDDEN);
        g_screen_status=heart_test;
        LV_LOG_WARN("enter test\r\n");

       } 
     
    }
}
void ui_event_Screen1(lv_event_t * e)
{
    lv_event_code_t event_code = lv_event_get_code(e);
    lv_obj_t * target = lv_event_get_target(e);
    if(event_code == LV_EVENT_GESTURE &&  lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_RIGHT) {
         
        _ui_screen_change(ui_Screen2, LV_SCR_LOAD_ANIM_MOVE_LEFT, 400, 0);
        //lv_imgbtn_set_state(ui_Screen2_ImgButton1,LV_IMGBTN_STATE_RELEASED);

    }
    if(event_code == LV_EVENT_GESTURE &&  lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_LEFT) {
        _ui_screen_change(ui_Screen2, LV_SCR_LOAD_ANIM_MOVE_LEFT, 400, 0);
    }
}
void ui_event_Screen2(lv_event_t * e)
{
    lv_event_code_t event_code = lv_event_get_code(e);
    lv_obj_t * target = lv_event_get_target(e);
    if(event_code == LV_EVENT_GESTURE &&  lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_LEFT) {
        if(g_screen_status==idle)
        {
//lv_imgbtn_set_state(ui_Screen2_ImgButton1,LV_IMGBTN_STATE_DISABLED);
    lv_obj_clear_flag(ui_Screen2_ImgButton1, LV_OBJ_FLAG_PRESS_LOCK);
            _ui_screen_change(ui_Screen3, LV_SCR_LOAD_ANIM_MOVE_LEFT, 100, 0);
  //          lv_imgbtn_set_state(ui_Screen2_ImgButton1,LV_IMGBTN_STATE_RELEASED);
        }

    }
     if(event_code == LV_EVENT_GESTURE &&  lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_RIGHT) {
         lv_obj_add_flag(ui_Screen2_Panel3, LV_OBJ_FLAG_HIDDEN);
        lv_obj_clear_flag(ui_Screen2_Panel2, LV_OBJ_FLAG_HIDDEN);
        g_screen_status=idle;

    }
}
void ui_event_Screen3(lv_event_t * e)
{
    lv_event_code_t event_code = lv_event_get_code(e);
    lv_obj_t * target = lv_event_get_target(e);
    if(event_code == LV_EVENT_GESTURE &&  lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_RIGHT) {
       lv_imgbtn_set_state(ui_Screen2_ImgButton1,LV_IMGBTN_STATE_DISABLED);
             _ui_screen_change(ui_Screen2, LV_SCR_LOAD_ANIM_MOVE_RIGHT, 100, 0);
 LV_LOG_WARN("3 enter 2test\r\n");
            lv_imgbtn_set_state(ui_Screen2_ImgButton1,LV_IMGBTN_STATE_RELEASED);

       
    }
    if(event_code == LV_EVENT_GESTURE &&  lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_LEFT) {
        _ui_screen_change(ui_Screen4, LV_SCR_LOAD_ANIM_MOVE_LEFT, 100, 0);
    }
}
void ui_event_Screen4(lv_event_t * e)
{
    lv_event_code_t event_code = lv_event_get_code(e);
    lv_obj_t * target = lv_event_get_target(e);
    if(event_code == LV_EVENT_GESTURE &&  lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_RIGHT) {
        _ui_screen_change(ui_Screen3, LV_SCR_LOAD_ANIM_MOVE_RIGHT, 100, 0);
    }
		 if(event_code == LV_EVENT_GESTURE &&  lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_LEFT) {
        _ui_screen_change(ui_Screen5, LV_SCR_LOAD_ANIM_MOVE_LEFT, 100, 0);
    }
}
void ui_event_Screen5(lv_event_t * e)
{
    lv_event_code_t event_code = lv_event_get_code(e);
    lv_obj_t * target = lv_event_get_target(e);
    if(event_code == LV_EVENT_GESTURE &&  lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_RIGHT) {
        _ui_screen_change(ui_Screen4, LV_SCR_LOAD_ANIM_MOVE_RIGHT, 100, 0);
    }
		 if(event_code == LV_EVENT_GESTURE &&  lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_LEFT) {
        _ui_screen_change(ui_Screen6, LV_SCR_LOAD_ANIM_MOVE_LEFT, 100, 0);
    }
}
void ui_event_Screen6(lv_event_t * e)
{
    lv_event_code_t event_code = lv_event_get_code(e);
    lv_obj_t * target = lv_event_get_target(e);
    if(event_code == LV_EVENT_GESTURE &&  lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_RIGHT) {
        _ui_screen_change(ui_Screen5, LV_SCR_LOAD_ANIM_MOVE_RIGHT, 100, 0);
    }
		 if(event_code == LV_EVENT_GESTURE &&  lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_LEFT) {
        _ui_screen_change(ui_Screen7, LV_SCR_LOAD_ANIM_MOVE_LEFT, 100, 0);
    }
}
void ui_event_Screen7(lv_event_t * e)
{
    lv_event_code_t event_code = lv_event_get_code(e);
    lv_obj_t * target = lv_event_get_target(e);
    if(event_code == LV_EVENT_GESTURE &&  lv_indev_get_gesture_dir(lv_indev_get_act()) == LV_DIR_RIGHT) {
        _ui_screen_change(ui_Screen6, LV_SCR_LOAD_ANIM_MOVE_RIGHT, 100, 0);
    }
}
///////////////////// SCREENS ////////////////////
void ui_Screen1_screen_init(void)
{
    ui_Screen1 = lv_obj_create(NULL);
    lv_obj_clear_flag(ui_Screen1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_bg_color(ui_Screen1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen1_Image1 = lv_img_create(ui_Screen1);
    lv_img_set_src(ui_Screen1_Image1, &ui_img_logo_png);
    lv_obj_set_width(ui_Screen1_Image1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Image1, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_align(ui_Screen1_Image1, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_Screen1_Image1, LV_OBJ_FLAG_ADV_HITTEST);     /// Flags
    lv_obj_clear_flag(ui_Screen1_Image1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

}
void ui_Screen1_screen_standby(void)
{
   
    lv_obj_del(ui_Screen1_Image1);

    lv_obj_set_style_outline_color(ui_Screen1, lv_color_hex(0xE60000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_opa(ui_Screen1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_width(ui_Screen1, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_pad(ui_Screen1, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_t *ui_Screen1_Panel1 = lv_obj_create(ui_Screen1);
    lv_obj_set_width(ui_Screen1_Panel1, 105);
    lv_obj_set_height(ui_Screen1_Panel1, 90);
    lv_obj_set_x(ui_Screen1_Panel1, 10);
    lv_obj_set_y(ui_Screen1_Panel1, 45);
    lv_obj_clear_flag(ui_Screen1_Panel1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Screen1_Panel1, 15, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Screen1_Panel1, lv_color_hex(0x1C1D2A), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen1_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_Screen1_Panel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_Screen1_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen1_Image1 = lv_img_create(ui_Screen1_Panel1);
    lv_img_set_src(ui_Screen1_Image1, &ui_img_spo2s_png);
    lv_obj_set_width(ui_Screen1_Image1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Image1, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Image1, -30);
    lv_obj_set_y(ui_Screen1_Image1, 0);
    lv_obj_set_align(ui_Screen1_Image1, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_Screen1_Image1, LV_OBJ_FLAG_ADV_HITTEST);     /// Flags
    lv_obj_clear_flag(ui_Screen1_Image1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_Screen1_Label1 = lv_label_create(ui_Screen1_Panel1);
    lv_obj_set_width(ui_Screen1_Label1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label1, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Label1, 0);
    lv_obj_set_y(ui_Screen1_Label1, 25);
    lv_obj_set_align(ui_Screen1_Label1, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label1, "SpO2");
    lv_obj_set_style_text_color(ui_Screen1_Label1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen1_Label5 = lv_label_create(ui_Screen1_Panel1);
    lv_obj_set_width(ui_Screen1_Label5, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label5, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_align(ui_Screen1_Label5, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label5, "98%");
    lv_obj_set_style_text_color(ui_Screen1_Label5, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label5, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen1_Panel2 = lv_obj_create(ui_Screen1);
    lv_obj_set_width(ui_Screen1_Panel2, 105);
    lv_obj_set_height(ui_Screen1_Panel2, 90);
    lv_obj_set_x(ui_Screen1_Panel2, -10);
    lv_obj_set_y(ui_Screen1_Panel2, 45);
    lv_obj_set_align(ui_Screen1_Panel2, LV_ALIGN_TOP_RIGHT);
    lv_obj_clear_flag(ui_Screen1_Panel2, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Screen1_Panel2, 15, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Screen1_Panel2, lv_color_hex(0x1C1D2A), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen1_Panel2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_Screen1_Panel2, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_Screen1_Panel2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen1_Image2 = lv_img_create(ui_Screen1_Panel2);
    lv_img_set_src(ui_Screen1_Image2, &ui_img_hrs_png);
    lv_obj_set_width(ui_Screen1_Image2, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Image2, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Image2, -30);
    lv_obj_set_y(ui_Screen1_Image2, 0);
    lv_obj_set_align(ui_Screen1_Image2, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_Screen1_Image2, LV_OBJ_FLAG_ADV_HITTEST);     /// Flags
    lv_obj_clear_flag(ui_Screen1_Image2, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_Screen1_Label2 = lv_label_create(ui_Screen1_Panel2);
    lv_obj_set_width(ui_Screen1_Label2, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label2, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Label2, 0);
    lv_obj_set_y(ui_Screen1_Label2, 25);
    lv_obj_set_align(ui_Screen1_Label2, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label2, "HR");
    lv_obj_set_style_text_color(ui_Screen1_Label2, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen1_Label6 = lv_label_create(ui_Screen1_Panel2);
    lv_obj_set_width(ui_Screen1_Label6, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label6, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_align(ui_Screen1_Label6, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label6, "72");
    lv_obj_set_style_text_color(ui_Screen1_Label6, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label6, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen1_Panel3 = lv_obj_create(ui_Screen1);
    lv_obj_set_width(ui_Screen1_Panel3, 105);
    lv_obj_set_height(ui_Screen1_Panel3, 90);
    lv_obj_set_x(ui_Screen1_Panel3, 10);
    lv_obj_set_y(ui_Screen1_Panel3, 151);
    lv_obj_clear_flag(ui_Screen1_Panel3, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Screen1_Panel3, 15, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Screen1_Panel3, lv_color_hex(0x1C1D2A), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen1_Panel3, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_Screen1_Panel3, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_Screen1_Panel3, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen1_Image3 = lv_img_create(ui_Screen1_Panel3);
    lv_img_set_src(ui_Screen1_Image3, &ui_img_tempss_png);
    lv_obj_set_width(ui_Screen1_Image3, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Image3, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Image3, -30);
    lv_obj_set_y(ui_Screen1_Image3, 0);
    lv_obj_set_align(ui_Screen1_Image3, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_Screen1_Image3, LV_OBJ_FLAG_ADV_HITTEST);     /// Flags
    lv_obj_clear_flag(ui_Screen1_Image3, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_Screen1_Label3 = lv_label_create(ui_Screen1_Panel3);
    lv_obj_set_width(ui_Screen1_Label3, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label3, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Label3, 0);
    lv_obj_set_y(ui_Screen1_Label3, 25);
    lv_obj_set_align(ui_Screen1_Label3, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label3, "TEMP");
    lv_obj_set_style_text_color(ui_Screen1_Label3, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label3, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen1_Label7 = lv_label_create(ui_Screen1_Panel3);
    lv_obj_set_width(ui_Screen1_Label7, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label7, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_align(ui_Screen1_Label7, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label7, "36.5");
    lv_obj_set_style_text_color(ui_Screen1_Label7, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label7, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen1_Panel4 = lv_obj_create(ui_Screen1);
    lv_obj_set_width(ui_Screen1_Panel4, 105);
    lv_obj_set_height(ui_Screen1_Panel4, 90);
    lv_obj_set_x(ui_Screen1_Panel4, -10);
    lv_obj_set_y(ui_Screen1_Panel4, 151);
    lv_obj_set_align(ui_Screen1_Panel4, LV_ALIGN_TOP_RIGHT);
    lv_obj_clear_flag(ui_Screen1_Panel4, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Screen1_Panel4, 15, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Screen1_Panel4, lv_color_hex(0x1C1D2A), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen1_Panel4, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui_Screen1_Panel4, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen1_Image4 = lv_img_create(ui_Screen1_Panel4);
    lv_img_set_src(ui_Screen1_Image4, &ui_img_resps_png);
    lv_obj_set_width(ui_Screen1_Image4, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Image4, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Image4, -30);
    lv_obj_set_y(ui_Screen1_Image4, 0);
    lv_obj_set_align(ui_Screen1_Image4, LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_Screen1_Image4, LV_OBJ_FLAG_ADV_HITTEST);     /// Flags
    lv_obj_clear_flag(ui_Screen1_Image4, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    ui_Screen1_Label4 = lv_label_create(ui_Screen1_Panel4);
    lv_obj_set_width(ui_Screen1_Label4, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label4, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Label4, 0);
    lv_obj_set_y(ui_Screen1_Label4, 25);
    lv_obj_set_align(ui_Screen1_Label4, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label4, "RPM");
    lv_obj_set_style_text_color(ui_Screen1_Label4, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label4, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen1_Label8 = lv_label_create(ui_Screen1_Panel4);
    lv_obj_set_width(ui_Screen1_Label8, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label8, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_align(ui_Screen1_Label8, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label8, "18");
    lv_obj_set_style_text_color(ui_Screen1_Label8, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label8, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen1_Label9 = lv_label_create(ui_Screen1);
    lv_obj_set_width(ui_Screen1_Label9, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label9, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Label9, 0);
    lv_obj_set_y(ui_Screen1_Label9, 120);
    lv_obj_set_align(ui_Screen1_Label9, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label9, "Tested on 2024-01-28 16:28");
    lv_obj_set_style_text_color(ui_Screen1_Label9, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label9, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_add_event_cb(ui_Screen1, ui_event_Screen1, LV_EVENT_ALL, NULL);


}
void ui_Screen2_screen_init(void)
{
    ui_Screen2 = lv_obj_create(NULL);
    lv_obj_clear_flag(ui_Screen2, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_bg_color(ui_Screen2, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_color(ui_Screen2, lv_color_hex(0xE60000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_opa(ui_Screen2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_width(ui_Screen2, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_outline_pad(ui_Screen2, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen2_Panel1 = lv_obj_create(ui_Screen2);
    lv_obj_set_width(ui_Screen2_Panel1, 240);
    lv_obj_set_height(ui_Screen2_Panel1, 40);
    lv_obj_set_x(ui_Screen2_Panel1, 0);
    lv_obj_set_y(ui_Screen2_Panel1, 3);
    lv_obj_clear_flag(ui_Screen2_Panel1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Screen2_Panel1, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Screen2_Panel1, lv_color_hex(0x000002), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen2_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_Screen2_Panel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_Screen2_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen1_Label1 = lv_label_create(ui_Screen2_Panel1);
    lv_obj_set_width(ui_Screen1_Label1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label1, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Label1, 90);
    lv_obj_set_y(ui_Screen1_Label1, -3);
    lv_obj_set_align(ui_Screen1_Label1, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label1, "12:00");
    lv_obj_set_style_text_color(ui_Screen1_Label1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui_Screen1_Label1, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen2_Panel2 = lv_obj_create(ui_Screen2);
    lv_obj_set_width(ui_Screen2_Panel2, 240);
    lv_obj_set_height(ui_Screen2_Panel2, 232);
    lv_obj_set_x(ui_Screen2_Panel2, 0);
    lv_obj_set_y(ui_Screen2_Panel2, 41);
    lv_obj_clear_flag(ui_Screen2_Panel2, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Screen2_Panel2, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Screen2_Panel2, lv_color_hex(0x000002), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen2_Panel2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_Screen2_Panel2, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_Screen2_Panel2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen2_ImgButton1 = lv_imgbtn_create(ui_Screen2_Panel2);
    lv_imgbtn_set_src(ui_Screen2_ImgButton1, LV_IMGBTN_STATE_RELEASED, NULL, &ui_img_health_png, NULL);
    lv_obj_set_height(ui_Screen2_ImgButton1, 100);
    lv_obj_set_width(ui_Screen2_ImgButton1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_x(ui_Screen2_ImgButton1, 0);
    lv_obj_set_y(ui_Screen2_ImgButton1, -20);
    lv_obj_set_align(ui_Screen2_ImgButton1, LV_ALIGN_CENTER);
   

    ui_Screen2_Label2 = lv_label_create(ui_Screen2_Panel2);
    lv_obj_set_width(ui_Screen2_Label2, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen2_Label2, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen2_Label2, 0);
    lv_obj_set_y(ui_Screen2_Label2, 56);
    lv_obj_set_align(ui_Screen2_Label2, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen2_Label2, "heart rate");
    lv_obj_set_style_text_color(ui_Screen2_Label2, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen2_Label2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui_Screen2_Label2, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen2_Panel3 = lv_obj_create(ui_Screen2);
    lv_obj_set_width(ui_Screen2_Panel3, 240);
    lv_obj_set_height(ui_Screen2_Panel3, 232);
    lv_obj_set_x(ui_Screen2_Panel3, 0);
    lv_obj_set_y(ui_Screen2_Panel3, 41);
    lv_obj_add_flag(ui_Screen2_Panel3, LV_OBJ_FLAG_HIDDEN);     /// Flags
    lv_obj_clear_flag(ui_Screen2_Panel3, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Screen2_Panel3, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Screen2_Panel3, lv_color_hex(0x000002), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen2_Panel3, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_Screen2_Panel3, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_Screen2_Panel3, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_t *ui_Screen2_Panel4 = lv_obj_create(ui_Screen2_Panel3);
    lv_obj_set_width(ui_Screen2_Panel4, 200);
    lv_obj_set_height(ui_Screen2_Panel4, 100);
    lv_obj_set_x(ui_Screen2_Panel4, 5);
    lv_obj_set_y(ui_Screen2_Panel4, -10);
    lv_obj_clear_flag(ui_Screen2_Panel4, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_bg_color(ui_Screen2_Panel4, lv_color_hex(0x1C1D2A), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen2_Panel4, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui_Screen2_Panel4, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen2_ImgButton2 = lv_imgbtn_create(ui_Screen2_Panel4);
    lv_imgbtn_set_src(ui_Screen2_ImgButton2, LV_IMGBTN_STATE_RELEASED, NULL, &ui_img_wrist_png, NULL);
    lv_obj_set_height(ui_Screen2_ImgButton2, 64);
    lv_obj_set_width(ui_Screen2_ImgButton2, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_align(ui_Screen2_ImgButton2, LV_ALIGN_CENTER);

    lv_obj_t *ui_Screen2_Label3 = lv_label_create(ui_Screen2_Panel4);
    lv_obj_set_width(ui_Screen2_Label3, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen2_Label3, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen2_Label3, 0);
    lv_obj_set_y(ui_Screen2_Label3, 31);
    lv_obj_set_align(ui_Screen2_Label3, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen2_Label3, "Wrist");
    lv_obj_set_style_text_color(ui_Screen2_Label3, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen2_Label3, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_t *ui_Screen2_Panel5 = lv_obj_create(ui_Screen2_Panel3);
    lv_obj_set_width(ui_Screen2_Panel5, 200);
    lv_obj_set_height(ui_Screen2_Panel5, 100);
    lv_obj_set_x(ui_Screen2_Panel5, 5);
    lv_obj_set_y(ui_Screen2_Panel5, 104);
    lv_obj_clear_flag(ui_Screen2_Panel5, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_bg_color(ui_Screen2_Panel5, lv_color_hex(0x1C1D2A), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen2_Panel5, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui_Screen2_Panel5, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen2_ImgButton3 = lv_imgbtn_create(ui_Screen2_Panel5);
    lv_imgbtn_set_src(ui_Screen2_ImgButton3, LV_IMGBTN_STATE_RELEASED, NULL, &ui_img_finger_png, NULL);
    lv_obj_set_height(ui_Screen2_ImgButton3, 64);
    lv_obj_set_width(ui_Screen2_ImgButton3, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_align(ui_Screen2_ImgButton3, LV_ALIGN_CENTER);

    lv_obj_t *ui_Screen2_Label4 = lv_label_create(ui_Screen2_Panel5);
    lv_obj_set_width(ui_Screen2_Label4, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen2_Label4, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen2_Label4, 0);
    lv_obj_set_y(ui_Screen2_Label4, 31);
    lv_obj_set_align(ui_Screen2_Label4, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen2_Label4, "Finger");
    lv_obj_set_style_text_color(ui_Screen2_Label4, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen2_Label4, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_add_event_cb(ui_Screen2_ImgButton1, ui_event_Screen1_ImgButton1, LV_EVENT_ALL, NULL);



    // ui_Screen2 = lv_obj_create(NULL);
    // lv_obj_clear_flag(ui_Screen2, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    // lv_obj_set_style_bg_color(ui_Screen2, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    // lv_obj_set_style_bg_opa(ui_Screen2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);


    // ui_Screen2_Panel1 = lv_obj_create(ui_Screen2);
    // lv_obj_set_width(ui_Screen2_Panel1, 240);
    // lv_obj_set_height(ui_Screen2_Panel1, 50);
    // lv_obj_set_x(ui_Screen2_Panel1, 0);
    // lv_obj_set_y(ui_Screen2_Panel1, 3);
    // lv_obj_clear_flag(ui_Screen2_Panel1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    // lv_obj_set_style_radius(ui_Screen2_Panel1, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
    // lv_obj_set_style_bg_color(ui_Screen2_Panel1, lv_color_hex(0x000002), LV_PART_MAIN | LV_STATE_DEFAULT);
    // lv_obj_set_style_bg_opa(ui_Screen2_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    // lv_obj_set_style_border_color(ui_Screen2_Panel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    // lv_obj_set_style_border_opa(ui_Screen2_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    // ui_Screen2_Label1 = lv_label_create(ui_Screen2_Panel1);
    // lv_obj_set_width(ui_Screen2_Label1, LV_SIZE_CONTENT);   /// 1
    // lv_obj_set_height(ui_Screen2_Label1, LV_SIZE_CONTENT);    /// 1
    // lv_obj_set_x(ui_Screen2_Label1, 90);
    // lv_obj_set_y(ui_Screen2_Label1, -3);
    // lv_obj_set_align(ui_Screen2_Label1, LV_ALIGN_CENTER);
    // lv_label_set_text(ui_Screen2_Label1, "12:00");
    // lv_obj_set_style_text_color(ui_Screen2_Label1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    // lv_obj_set_style_text_opa(ui_Screen2_Label1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    // lv_obj_set_style_text_font(ui_Screen1_Label1, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);




    // ui_Screen2_ImgButton1 = lv_imgbtn_create(ui_Screen2);
    // lv_imgbtn_set_src(ui_Screen2_ImgButton1, LV_IMGBTN_STATE_RELEASED, NULL, &ui_img_health_png, NULL);
    // lv_obj_set_height(ui_Screen2_ImgButton1, 100);
    // lv_obj_set_width(ui_Screen2_ImgButton1, LV_SIZE_CONTENT);   /// 1
    // lv_obj_set_align(ui_Screen2_ImgButton1, LV_ALIGN_CENTER);

    // ui_Screen2_Label2 = lv_label_create(ui_Screen2);
    // lv_obj_set_width(ui_Screen2_Label2, LV_SIZE_CONTENT);   /// 1
    // lv_obj_set_height(ui_Screen2_Label2, LV_SIZE_CONTENT);    /// 1
    // lv_obj_set_x(ui_Screen2_Label2, 0);
    // lv_obj_set_y(ui_Screen2_Label2, 70);
    // lv_obj_set_align(ui_Screen2_Label2, LV_ALIGN_CENTER);
    // lv_label_set_text(ui_Screen2_Label2, "Heart Rate");
    // lv_obj_set_style_text_color(ui_Screen2_Label2, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    // lv_obj_set_style_text_opa(ui_Screen2_Label2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    // lv_obj_set_style_text_font(ui_Screen2_Label2, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);

   lv_obj_add_event_cb(ui_Screen2, ui_event_Screen2, LV_EVENT_ALL, NULL);

}
void ui_Screen3_screen_init(void)
{
    ui_Screen3 = lv_obj_create(NULL);
    lv_obj_clear_flag(ui_Screen3, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_bg_color(ui_Screen3, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen3, 255, LV_PART_MAIN | LV_STATE_DEFAULT);


    ui_Screen3_Panel1 = lv_obj_create(ui_Screen3);
    lv_obj_set_width(ui_Screen3_Panel1, 240);
    lv_obj_set_height(ui_Screen3_Panel1, 40);
    lv_obj_set_x(ui_Screen3_Panel1, 0);
    lv_obj_set_y(ui_Screen3_Panel1, 3);
    lv_obj_clear_flag(ui_Screen3_Panel1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Screen3_Panel1, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Screen3_Panel1, lv_color_hex(0x000002), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen3_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_Screen3_Panel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_Screen3_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    ui_Screen1_Label1 = lv_label_create(ui_Screen3_Panel1);
    lv_obj_set_width(ui_Screen1_Label1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label1, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Label1, 90);
    lv_obj_set_y(ui_Screen1_Label1, -3);
    lv_obj_set_align(ui_Screen1_Label1, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label1, "12:00");
    lv_obj_set_style_text_color(ui_Screen1_Label1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui_Screen1_Label1, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen3_ImgButton2 = lv_imgbtn_create(ui_Screen3);
    lv_imgbtn_set_src(ui_Screen3_ImgButton2, LV_IMGBTN_STATE_RELEASED, NULL, &ui_img_temp_png, NULL);
    lv_obj_set_height(ui_Screen3_ImgButton2, 100);
    lv_obj_set_width(ui_Screen3_ImgButton2, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_align(ui_Screen3_ImgButton2, LV_ALIGN_CENTER);

    ui_Screen3_Label1 = lv_label_create(ui_Screen3);
    lv_obj_set_width(ui_Screen3_Label1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen3_Label1, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen3_Label1, 0);
    lv_obj_set_y(ui_Screen3_Label1, 70);
    lv_obj_set_align(ui_Screen3_Label1, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen3_Label1, "Temp");
    lv_obj_set_style_text_color(ui_Screen3_Label1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen3_Label1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui_Screen3_Label1, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_add_event_cb(ui_Screen3, ui_event_Screen3, LV_EVENT_ALL, NULL);

}
void ui_Screen4_screen_init(void)
{
    ui_Screen4 = lv_obj_create(NULL);
    lv_obj_clear_flag(ui_Screen4, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_bg_color(ui_Screen4, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen4, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    ui_Screen4_Panel1 = lv_obj_create(ui_Screen4);
    lv_obj_set_width(ui_Screen4_Panel1, 240);
    lv_obj_set_height(ui_Screen4_Panel1, 40);
    lv_obj_set_x(ui_Screen4_Panel1, 0);
    lv_obj_set_y(ui_Screen4_Panel1, 3);
    lv_obj_clear_flag(ui_Screen4_Panel1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Screen4_Panel1, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Screen4_Panel1, lv_color_hex(0x000002), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen4_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_Screen4_Panel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_Screen4_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    ui_Screen1_Label1 = lv_label_create(ui_Screen4_Panel1);
    lv_obj_set_width(ui_Screen1_Label1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label1, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Label1, 90);
    lv_obj_set_y(ui_Screen1_Label1, -3);
    lv_obj_set_align(ui_Screen1_Label1, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label1, "12:00");
    lv_obj_set_style_text_color(ui_Screen1_Label1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui_Screen1_Label1, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);



    ui_Screen3_ImgButton1 = lv_imgbtn_create(ui_Screen4);
    lv_imgbtn_set_src(ui_Screen3_ImgButton1, LV_IMGBTN_STATE_RELEASED, NULL, &ui_img_sleeping_png, NULL);
    lv_obj_set_height(ui_Screen3_ImgButton1, 100);
    lv_obj_set_width(ui_Screen3_ImgButton1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_align(ui_Screen3_ImgButton1, LV_ALIGN_CENTER);

    ui_Screen3_Label2 = lv_label_create(ui_Screen4);
    lv_obj_set_width(ui_Screen3_Label2, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen3_Label2, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen3_Label2, 0);
    lv_obj_set_y(ui_Screen3_Label2, 70);
    lv_obj_set_align(ui_Screen3_Label2, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen3_Label2, "Sleeping");
    lv_obj_set_style_text_color(ui_Screen3_Label2, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen3_Label2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui_Screen3_Label2, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_add_event_cb(ui_Screen4, ui_event_Screen4, LV_EVENT_ALL, NULL);

}
void ui_Screen5_screen_init(void)
{
    ui_Screen5 = lv_obj_create(NULL);
    lv_obj_clear_flag(ui_Screen5, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_bg_color(ui_Screen5, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen5, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_t * ui_Screen4_Panel1 = lv_obj_create(ui_Screen5);
    lv_obj_set_width(ui_Screen4_Panel1, 240);
    lv_obj_set_height(ui_Screen4_Panel1, 40);
    lv_obj_set_x(ui_Screen4_Panel1, 0);
    lv_obj_set_y(ui_Screen4_Panel1, 3);
    lv_obj_clear_flag(ui_Screen4_Panel1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Screen4_Panel1, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Screen4_Panel1, lv_color_hex(0x000002), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen4_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_Screen4_Panel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_Screen4_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    ui_Screen1_Label1 = lv_label_create(ui_Screen4_Panel1);
    lv_obj_set_width(ui_Screen1_Label1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label1, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Label1, 90);
    lv_obj_set_y(ui_Screen1_Label1, -3);
    lv_obj_set_align(ui_Screen1_Label1, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label1, "12:00");
    lv_obj_set_style_text_color(ui_Screen1_Label1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui_Screen1_Label1, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);


    ui_Screen5_ImgButton1 = lv_imgbtn_create(ui_Screen5);
    lv_imgbtn_set_src(ui_Screen5_ImgButton1, LV_IMGBTN_STATE_RELEASED, NULL, &ui_img_sport_png, NULL);
    lv_obj_set_height(ui_Screen5_ImgButton1, 100);
    lv_obj_set_width(ui_Screen5_ImgButton1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_align(ui_Screen5_ImgButton1, LV_ALIGN_CENTER);

    ui_Screen5_Label2 = lv_label_create(ui_Screen5);
    lv_obj_set_width(ui_Screen5_Label2, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen5_Label2, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen5_Label2, 0);
    lv_obj_set_y(ui_Screen5_Label2, 70);
    lv_obj_set_align(ui_Screen5_Label2, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen5_Label2, "Sports");
    lv_obj_set_style_text_color(ui_Screen5_Label2, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen5_Label2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui_Screen5_Label2, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_add_event_cb(ui_Screen5, ui_event_Screen5, LV_EVENT_ALL, NULL);

}
void ui_Screen6_screen_init(void)
{
    ui_Screen6 = lv_obj_create(NULL);
    lv_obj_clear_flag(ui_Screen6, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_bg_color(ui_Screen6, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen6, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

 lv_obj_t * ui_Screen4_Panel1 = lv_obj_create(ui_Screen6);
    lv_obj_set_width(ui_Screen4_Panel1, 240);
    lv_obj_set_height(ui_Screen4_Panel1, 40);
    lv_obj_set_x(ui_Screen4_Panel1, 0);
    lv_obj_set_y(ui_Screen4_Panel1, 3);
    lv_obj_clear_flag(ui_Screen4_Panel1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Screen4_Panel1, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Screen4_Panel1, lv_color_hex(0x000002), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen4_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_Screen4_Panel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_Screen4_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    ui_Screen1_Label1 = lv_label_create(ui_Screen4_Panel1);
    lv_obj_set_width(ui_Screen1_Label1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label1, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Label1, 90);
    lv_obj_set_y(ui_Screen1_Label1, -3);
    lv_obj_set_align(ui_Screen1_Label1, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label1, "12:00");
    lv_obj_set_style_text_color(ui_Screen1_Label1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui_Screen1_Label1, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen6_ImgButton1 = lv_imgbtn_create(ui_Screen6);
    lv_imgbtn_set_src(ui_Screen6_ImgButton1, LV_IMGBTN_STATE_RELEASED, NULL, &ui_img_history_png, NULL);
    lv_obj_set_height(ui_Screen6_ImgButton1, 100);
    lv_obj_set_width(ui_Screen6_ImgButton1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_align(ui_Screen6_ImgButton1, LV_ALIGN_CENTER);

    ui_Screen6_Label2 = lv_label_create(ui_Screen6);
    lv_obj_set_width(ui_Screen6_Label2, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen6_Label2, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen6_Label2, 0);
    lv_obj_set_y(ui_Screen6_Label2, 70);
    lv_obj_set_align(ui_Screen6_Label2, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen6_Label2, "History");
    lv_obj_set_style_text_color(ui_Screen6_Label2, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen6_Label2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui_Screen6_Label2, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_add_event_cb(ui_Screen6, ui_event_Screen6, LV_EVENT_ALL, NULL);

}
void ui_Screen7_screen_init(void)
{
    ui_Screen7 = lv_obj_create(NULL);
    lv_obj_clear_flag(ui_Screen7, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_bg_color(ui_Screen7, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen7, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
 lv_obj_t * ui_Screen4_Panel1 = lv_obj_create(ui_Screen7);
    lv_obj_set_width(ui_Screen4_Panel1, 240);
    lv_obj_set_height(ui_Screen4_Panel1, 40);
    lv_obj_set_x(ui_Screen4_Panel1, 0);
    lv_obj_set_y(ui_Screen4_Panel1, 3);
    lv_obj_clear_flag(ui_Screen4_Panel1, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Screen4_Panel1, 3, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Screen4_Panel1, lv_color_hex(0x000002), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Screen4_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_Screen4_Panel1, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_Screen4_Panel1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    ui_Screen1_Label1 = lv_label_create(ui_Screen4_Panel1);
    lv_obj_set_width(ui_Screen1_Label1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen1_Label1, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen1_Label1, 90);
    lv_obj_set_y(ui_Screen1_Label1, -3);
    lv_obj_set_align(ui_Screen1_Label1, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen1_Label1, "12:00");
    lv_obj_set_style_text_color(ui_Screen1_Label1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen1_Label1, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui_Screen1_Label1, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Screen7_ImgButton1 = lv_imgbtn_create(ui_Screen7);
    lv_imgbtn_set_src(ui_Screen7_ImgButton1, LV_IMGBTN_STATE_RELEASED, NULL, &ui_img_setting_png, NULL);
    lv_obj_set_height(ui_Screen7_ImgButton1, 100);
    lv_obj_set_width(ui_Screen7_ImgButton1, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_align(ui_Screen7_ImgButton1, LV_ALIGN_CENTER);

    ui_Screen7_Label2 = lv_label_create(ui_Screen7);
    lv_obj_set_width(ui_Screen7_Label2, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Screen7_Label2, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Screen7_Label2, 0);
    lv_obj_set_y(ui_Screen7_Label2, 70);
    lv_obj_set_align(ui_Screen7_Label2, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Screen7_Label2, "Setting");
    lv_obj_set_style_text_color(ui_Screen7_Label2, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui_Screen7_Label2, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui_Screen7_Label2, &lv_font_montserrat_18, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_add_event_cb(ui_Screen7, ui_event_Screen7, LV_EVENT_ALL, NULL);

}
void ui_init(void)
{
        g_screen_status=idle;
        lv_disp_t * dispp = lv_disp_get_default();
        lv_theme_t * theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
                                                false, LV_FONT_DEFAULT);
		lv_disp_set_theme(dispp, theme);
		ui_Screen1_screen_init();
		ui_Screen2_screen_init();
		ui_Screen3_screen_init();
		ui_Screen4_screen_init();
		ui_Screen5_screen_init();
		ui_Screen6_screen_init();
		ui_Screen7_screen_init();

        lv_disp_load_scr(ui_Screen1);
        lv_timer_handler();
    #ifdef SIMULATION
        sleep(1);
    #else
        delay_ms(2000);
    #endif
        ui_Screen1_screen_standby();
       // lv_disp_load_scr(ui_Screen2);	
}
